package one.one.thirteen;

import java.util.Arrays;

public class MatrixTransport {

	static int[][] transport(int[][] a) {
		int[][] r = new int[a[0].length][a.length];
		for (int i = 0; i < a[0].length; i++) {
			for (int j = 0; j < a.length; j++) {
				r[i][j] = a[j][i];
			}
		}
		return r;
	}

	public static void main(String[] args) throws Exception {
		int[][] a = new int[2][4];
		a[0][0] = 1;
		a[0][1] = 0;
		a[0][2] = 3;
		a[0][3] = -1;
		a[1][0] = 2;
		a[1][1] = 1;
		a[1][2] = 0;
		a[1][3] = 2;

		int[][] r = transport(a);
		
		for(int i=0;i<r.length;i++) {
			for(int j=0;j<r[0].length;j++) {
				System.out.print(" "+r[i][j]+" ");
			}
			System.out.println();
		}
		

	}

}
